<template>
  <!-- 展示店铺的分类 -->
  <van-button type="primary" color="red" @click="addshops">收藏</van-button>
  <div>
    <div>
      <van-tabs v-model:active="active">
        <van-tab title="菜品分类">
          <goodstype></goodstype>
        </van-tab>
        <van-tab title="店家评价"> <comment></comment> </van-tab>
      </van-tabs>
    </div>
  </div>
</template>

<script>
import goodstype from "./goodstype.vue";
import comment from "./comment.vue";
export default {
  data() {
    return {
      active: "",
      user_id: localStorage.getItem("id"),
      id: this.$route.query.id,
      shops_id:"",
    };
  },
  components: {
    goodstype,
    comment,
  },
  mounted() {},
  methods: {
    addshops: function () {
      this.myaxios(this.weburl + "user/collect/", "post",{
        user_id:this.user_id,
        id: this.id
      }).then((data) => {
        console.log(data)
        if(data.code == 200){
          this.$toast.success(data.msg);
        }else{
          this.$toast.fail(data.msg);
        }
        })
    },
  },
  created() {},
};
</script>

<style scoped>
</style>